From 4f050d52f57ce5681f535fb924e4cea6c41df1b0 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 20 May 2008 14:18:32 +0100 Subject: [PATCH] xend: Fix bugzilla bug #1253. Signed-off-by: Masaki Kanno --- tools/python/xen/xend/XendConfig.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py index cdb4c1c6f3..8c76a11085 100644 --- a/tools/python/xen/xend/XendConfig.py +++ b/tools/python/xen/xend/XendConfig.py @@ -1143,10 +1143,11 @@ class XendConfig(dict): if o_dev_type == 'vbd' or o_dev_type == 'tap': blkdev_file = blkdev_uname_to_file(dev_uname) o_dev_uname = sxp.child_value(o_dev_info, 'uname') - o_blkdev_file = blkdev_uname_to_file(o_dev_uname) - if blkdev_file == o_blkdev_file: - raise XendConfigError('The file "%s" is already used' % - blkdev_file) + if o_dev_uname != None: + o_blkdev_file = blkdev_uname_to_file(o_dev_uname) + if blkdev_file == o_blkdev_file: + raise XendConfigError('The file "%s" is already used' % + blkdev_file) o_blkdev_name = sxp.child_value(o_dev_info, 'dev') o_devid = self._blkdev_name_to_number(o_blkdev_name) if o_devid != None and devid == o_devid: -- 2.30.2